package com.whg.demo.controller;

import com.whg.demo.model.JsonData;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author whg
 * @create 2024/2/27 17:29
 * @description：
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping("hello")
    public JsonData sayHello(@RequestParam("name") String name){
        String str = "say hello world to " + name + "!";
        return JsonData.buildSuccess(str);
    }
}
